{% extends 'InterArticleBundle::layout.admin.html.twig' %}

{% block header_title %}USER{% endblock %}

{% block css_script %}
<style>
.error{
	color:red;
}
</style>
{% endblock %}

{% block content %}
<div class="row">
					
	<!-- Basic forms -->
	<div class="col-lg-6">
		<div class="module">
			<div class="module-header"><h4>Register</h4></div>
			<div class="module-content">
			
				<form action="{{ path('inter_article_admin_create') }}" method="post" {{ form_enctype(form) }} class="form-horizontal" />
	
					<div class="form-group">
						 {{ form_label(form.user.userName) }}
						 <div class="error col-lg-10">
        				 	{{ form_errors(form.user.userName) }}
        				 </div>        						
						<div class="col-lg-10">
							{{ form_widget(form.user.userName) }}
						</div>
					</div>
					
					<div class="form-group">
						 {{ form_label(form.user.email) }}
						 <div class="error col-lg-10">
        				 	{{ form_errors(form.user.email) }}
        				 </div>        						
						<div class="col-lg-10">
							{{ form_widget(form.user.email) }}
						</div>
					</div>
					
					<div class="form-group">
						{{ form_label(form.user.password.first, null,  {'label': 'Password', 'label_attr': {'class': 'col-lg-2 control-label'}} ) }}
						<div class="error col-lg-10">
							{{ form_errors(form.user.password.first) }}
						</div>
						<div class="col-lg-10">
						    {{ form_widget(form.user.password.first, { 'attr': {'class': 'form-control'} }) }}
						</div>
					</div>
					
					<div class="form-group">
						{{ form_label(form.user.password.second, null,  {'label': 'Confirm Password', 'label_attr': {'class': 'col-lg-2 control-label'}}) }}
						<div class="error col-lg-10">
							{{ form_errors(form.user.password.second) }}
						</div>
						<div class="col-lg-10">						    
						    {{ form_widget(form.user.password.second, { 'attr': {'class': 'form-control'} }) }}
						</div>
					</div>
					<div class="form-group">
						{{ form_label(form.terms, null,  {'label': 'Terms', 'label_attr': {'class': 'col-lg-2 control-label'}} ) }}
        				<div class="error col-lg-10">
							{{ form_errors(form.terms) }} 
        				</div>
        				<div class="col-lg-10">
        					{{ form_widget(form.terms) }}
        				</div> 
					</div>
						{{ form_rest(form) }}
					<div class="form-group">
						<div class="col-lg-offset-2 col-lg-10">
							<button type="submit" class="btn btn-primary">Save changes</button>
							<button class="btn btn-default" onclick="location.href='{{ path('inter_article_admin_list_user') }}'">Cancel</button>
						</div>
					</div>
	
				</form>
	
			</div>
		</div>
	</div>
	<!-- /Basic forms -->

</div>
{% endblock %}





